<template>
    <art-table :data="tableData" :loading="tableLoading" :currentPage="pageNum" :pageSize="pageSize" :total="pageTotal"
        @current-change="currentChange" @size-change="sizeChange">
        <template #default>
            <el-table-column label="报名时间" prop="signUpTime" align="center" />
            <el-table-column label="约考时间" prop="appointmentExam" align="center" />
            <el-table-column label="科目" prop="subject" align="center" />
            <el-table-column label="车型" prop="carType" align="center" />
            <el-table-column label="考试分数" prop="score" align="center" />
        </template>
    </art-table>
</template>
<script setup lang="ts">
import { ACCOUNT_TABLE_DATA } from '@/mock/temp/formData_userlist'
import { FormInstance } from 'element-plus'
import { ElMessageBox, ElMessage } from 'element-plus'
import type { FormRules } from 'element-plus'

const tableData = ref([{
    signUpTime: '2025-6-12 15:24',
    appointmentExam: '2025-6-18 15:24',
    subject: '满分考试',
    carType: '小车',
    score: '100',
}])

const tableLoading = ref(false)
const pageNum = ref(1)
const pageSize = ref(10)
const pageTotal = ref(0)
// async function getData() {
//     try {
//         tableLoading.value = true
//         const { code, data } = await userList({
//             pageNum: pageNum.value,
//             pageSize: pageSize.value,
//             queryStartTime: searchForm.creatStartTime ? formatDate(searchForm.creatStartTime) : '',
//             queryEndTime: searchForm.creatEndTime ? formatDate(searchForm.creatEndTime) : '',
//             queryName: searchForm.name,
//             queryMobile: searchForm.phone,
//             queryGender: searchForm.sex,
//             queryIsVip: searchForm.level,
//             queryStartActiveTime: searchForm.activeStartTime ? formatDate(searchForm.activeStartTime) : '',
//             queryEndActiveTime: searchForm.activeEndTime ? formatDate(searchForm.activeEndTime) : ''
//         })
//         if (code === '00000' && data) {
//             tableData.value = data.list
//             pageTotal.value = data.total

//             console.log(tableData.value, 'tableData.value')
//         }
//     } catch (e) {
//     } finally {
//         tableLoading.value = false
//     }
// }
const currentChange = (val: number) => {
    pageNum.value = val
    // getData()
}

const sizeChange = (val: number) => {
    pageSize.value = val
    pageNum.value = 1
    // getData()
}
</script>
<style scoped lang="scss"></style>